package com.eco.fanliapp.controller.app;

import com.eco.fanliapp.common.base.BaseController;
import com.eco.fanliapp.common.response.ServerResponse;
import com.eco.fanliapp.entity.AppNewsLog;
import com.eco.fanliapp.service.IAppNewsLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/mobile/msg")
public class MessageController extends BaseController {

	@Autowired
	private IAppNewsLogService iAppNewsLogService;

	//邀请赚钱红包提醒（新）
	@GetMapping("/getRedEnvelopes")
	@ResponseBody
	public ServerResponse<List<AppNewsLog>> getRedEnvelopes(Integer pageNum, Integer pageSize){
		return iAppNewsLogService.getRedEnvelopes(getAppUser().getUserId());
	}
}
